#!/usr/bin/env bash

set -e
mkdir -p /opt/tmp
name="thrift"
wget http://apache.forsale.plus/thrift/0.11.0/thrift-0.11.0.tar.gz


mkdir /opt/${name} && tar -zxvf thrift-0.11.0.tar.gz -C  /opt/${name}  --strip-components 1

mv thrift-0.11.0.tar.gz /opt/tmp

cd /opt/${name}
./configure
make && make install